﻿using System.Collections.Generic;
using FluentNHibernate.Mapping;

namespace Model
{
	public class Region
	{
		public virtual int ID { get; set; }
		public virtual string Name { get; set; }
		public virtual string Url { get; set; }
		private IList<Realm> _realms = new List<Realm>();
		public virtual IList<Realm> Realms { get { return _realms; } set { _realms = value; } }
	}

	public class RegionMapping : ClassMap<Region>
	{
		public RegionMapping()
		{
			Id(x => x.ID);
			Map(x => x.Name);
			Map(x => x.Url);
			HasMany(x => x.Realms);
		}
	}
}
